<template>
    <div class="page">
        <div class="title-box">
            <img :src="user.headimgurl" class="user-icon" />
            <p>{{user.nickname}}</p>
        </div>
        <div class="item-box">
            <div class="item" v-for="(item,index) in info" :key="index">
                <div class="item-left">
                    <p>{{item.withdraw_desc}}</p>
                    <span>{{item.withdraw_status_desc}}</span>
                </div>
                <div class="item-right">{{item.withdraw_money}}元</div>
            </div>
        </div>
    </div>
</template>

<script>
import { customerInfo, withdrawRecord } from "@/api/api";
export default {
    data() {
        return {
            user: {},
            info:[]
        };
    },
    created() {
        customerInfo().then(res => {
            if (res.code) {
                this.user = res.results;
            } else {
                Toast(res);
            }
        });
        this.getData()
    },
    methods: {
        getData() {
            withdrawRecord({prepare_id:this.$route.query.id}).then(res=>{
                if(res.code == '0'){
                    this.info = res.results
                }
            })
        }
    }
};
</script>

<style scoped>
.item-box {
    padding: 60px 24px 0 24px;
}
.item {
    display: flex;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}
.item-left {
    flex: 6;
}
.item-left p {
    height: 40px;
    line-height: 20px;
    font-size: 14px;
    text-overflow: -o-ellipsis-lastline;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}
.item-left span{
    line-height: 20px;
    font-size: 12px;
    color: #999;
}
.item-right {
    flex: 4;
    text-align: right;
    color: #ff5e10;
    font-size: 20px;
    font-weight: 600;
    line-height: 65px;
}
</style>